/**
 * 文件名：StockoutErpResourceMapper.java
 *
 * 创建人：Fyh - 1009173473@qq.com
 *
 * 创建时间：2019年9月9日 下午2:36:34
 *
 * 版权所有：南京植百汇智能科技服务有限公司
 */
package com.z100h.supplychain.evidence.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.z100h.supplychain.evidence.entity.ErpResPrinter;
import com.z100h.supplychain.evidence.entity.ErpSku;
import com.z100h.supplychain.evidence.entity.StockoutErpResourceVo;
import com.z100h.supplychain.evidence.entity.StockoutSku;

/**
 * [描述信息：说明类的基本功能]
 *
 * @author Fyh - 1009173473@qq.com
 * @version 1.0 Created on 2019年9月9日 下午2:36:34
 */
@MyBatisMapper
public interface StockoutErpResourceMapper {

	public void insertOrderErpResource(@Param("evidenceId") String evidenceId, @Param("userId") String userId,
			@Param("orderId") String orderId, @Param("serviceType") String serviceType);

	public Integer getOrderErpResourceAmount(@Param("orderId") String orderId);

	public void insertOrderErpResourceOfSale(@Param("evidenceId") String evidenceId, @Param("userId") String userId,
			@Param("orderId") String orderId, @Param("serviceType") String serviceType);

	public void insertRepairErpResource(@Param("evidenceId") String evidenceId, @Param("userId") String userId,
			@Param("repairId") String repairId, @Param("serviceType") String serviceType);

	public void productionCompletionByEvidenceId(@Param("evidenceId") String evidenceId);

	public void productionCompletionByIds(@Param("ids") List<String> ids);

	public List<StockoutErpResourceVo> findStockoutErpResourceVoListByEvidenceId(@Param("evidenceId") String evidenceId,
			@Param("state") String state);

	public List<StockoutErpResourceVo> findQcErpResourceVoListByEvidenceId(String evidenceId);

	public List<StockoutErpResourceVo> findOutErpResourceVoListByEvidenceId(String evidenceId);

	public List<StockoutSku> findStockoutSkuErpResByIds(@Param("ids") List<String> ids);

	public void qcFailedByEvidenceId(@Param("evidenceId") String evidenceId);

	public void qcFailedByIds(@Param("evidenceId") String evidenceId, @Param("ids") List<String> ids);

	public List<ErpSku> findUnStockoutSkuListByErpOrderResId(@Param("evidenceId") String evidenceId,
			@Param("erpResId") String erpResId, @Param("ids") List<String> serviceIds);

	public List<ErpSku> findOtherUnStockoutSkuListByErpOrderResId(@Param("evidenceId") String evidenceId,
			@Param("erpResId") String erpResId, @Param("ids") List<String> serviceIds);

	public List<ErpSku> findUnStockoutSkuListByErpRepairResId(@Param("evidenceId") String evidenceId,
			@Param("erpResId") String erpResId, @Param("ids") List<String> serviceIds);

	public List<String> findErpResIdByEid(@Param("evidenceId") String evidenceId);

	public List<String> findProductionCompletionErpResIdByEid(@Param("evidenceId") String evidenceId);

	public List<String> findProductionCompletionErpOrderResIdByEid(String evidenceId);

	public List<String> findProductionCompletionErpRepairResIdByEid(String evidenceId);

	public void updateResQcState(@Param("evidenceId") String evidenceId, @Param("state") String state);

	public void updateResQcStateByErpResIds(@Param("evidenceId") String evidenceId,
			@Param("erpResIds") List<String> erpResIds, @Param("state") String state);

	public void updateOutState(String evidenceId);

	public void updateOutStateByIds(@Param("ids") List<String> ids);

	public List<String> findResNotOut(String evidenceId);

	public List<String> findServiceId(@Param("evidenceId") String evidenceId,
			@Param("erpResIds") List<String> erpResIds);

	public List<ErpResPrinter> findErpResByEid(@Param("evidenceId") String evidenceId);

	public List<ErpResPrinter> findErpResByEids(@Param("evidenceIds") List<String> evidenceIds);

	public List<ErpResPrinter> findErpResByOrderIds(@Param("orderIds") List<String> orderIds);

	public List<String> getOrderErpResId(String orderId);

	public List<ErpSku> findNotAmountOutErpSkuList(String companyId);

	public void updateStockoutErpSkuAmountIncrementOut(@Param("evidenceId") String evidenceId,
			@Param("skuId") Integer skuId, @Param("amount") Integer amount);

}
